package com.software.dao;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class ConnectionDao {

    Connection conn = null;
    private String user;
    private String password;
    public Connection getConnection() {
        try {
            Class.forName("com.mysql.jdbc.Driver");
            user="root";
            password = "dddd";
            conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/spring?characterEncoding=utf8&useSSL=false",
                    user,password);



        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } catch (SQLException throwables) {
            throwables.printStackTrace();
        }

        return conn;

    }




}
